package com.example.demo.global.response;

public enum ResponseCode {
    SUCCESS(0, "请求成功"),

    LOGINFAILURE(2001, "用户不存在或密码错误"),

    UNAUTHORIZED(2002, "未授权，请重新登录"),

    INVALID_TOKEN(2003, "非法token"),

    PARAMEXCEPTION(3001, "入参异常"),

    EMPTYRESULT(3002, "无数据"),

    INTERNALERROR(4001, "服务器内部异常");

    private int code;
    private String msg;

    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
